package com.cx.dao;

import com.cx.domain.T_User;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface T_UserDao {
    @Select("SELECT * FROM `t_user`")
    List<T_User> selectall();
    @Insert("INSERT INTO t_user(`name`,`password`,age,address)VALUES(#{name},#{password},#{age},#{address})")
    void insertuser(@Param("name")String name,@Param("password")String password,@Param("age")String age,@Param("address")String address);
    @Update("UPDATE t_user SET `name`=#{name},`password`=#{password},age=#{age},address=#{address} WHERE id=#{id}")
    void updateuser(@Param("id")String id,@Param("name")String name,@Param("password")String password,@Param("age")String age,@Param("address")String address);
    @Delete("DELETE FROM t_user WHERE id=#{id}")
    void deleteuser(@Param("id")String id);
}